package com.example.provider2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <b>TODO . </b>
 *
 * @author yangyl11
 * @version 1.0.0
 * @date 2020/11/9
 * @since JDK 1.8
 */
@RestController
@RefreshScope
public class TestController {
	private Logger logger = LoggerFactory.getLogger(TestController.class);


	@Value("${server.port}")
	private Integer port;

	@Value("${config.param:hello}")
	private String param;

	@RequestMapping("/test")
	public String test() {

		logger.info("test provider2");
		return "test provider2 @ " + port + " ; param:" + param;
	}
}
